package com.atguigu.gmall.publisher.service.impl;

import com.atguigu.gmall.publisher.bean.TradeProvinceOrderAmount;
import com.atguigu.gmall.publisher.mapper.TradeMapper;
import com.atguigu.gmall.publisher.service.TradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Author: Felix
 * Date: 2022/7/17
 * Desc: 交易域统计Service接口实现类
 */
@Service
public class TradeServiceImpl implements TradeService {
    @Autowired
    private TradeMapper tradeMapper;
    @Override
    public Double getGMV(Integer date) {
        return tradeMapper.selectGMV(date);
    }

    @Override
    public List<TradeProvinceOrderAmount> getProvinceOrderAmount(Integer date) {
        return tradeMapper.selectProvinceOrderAmount(date);
    }
}
